package com.ruoyi.web.controller.system;

import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.elastic.service.cluster;
import com.ruoyi.system.domain.GrokDictData;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * @Description: TODO
 * @CreateTime: 2023-01-06  22:38
 * @Author: chaozi
 * @Version: 1.0
 */
@RestController
@RequestMapping("/system/elastic/cluster")
@Api(value = "EScluster管理",tags = "cluster管理")
public class ElasticClusterController {
    @Autowired
    private cluster cluster;

    /**
     * 查询【请填写功能名称】列表
     */
    @ApiOperation("获取cluster监控只")
    @GetMapping("/health")
    public Map health() throws IOException {
        return cluster.health();
    }

}
